//
//  WarnModel.h
//  YuTang
//
//  Created by 葛悦彣 on 2024/8/30.
//

#import <Foundation/Foundation.h>
#import "TemplateFoundDetailsModel.h"
#import "CombinedPunchModel.h"

@class alarmProcessRecordModel,alarmProcessDetailModel,alarmDataModel,taskDetailModelListModel;

NS_ASSUME_NONNULL_BEGIN

@interface WarnModel : NSObject

@property (nonatomic ,strong) NSString * ID;

@property (nonatomic ,strong) NSString * createTime;
///模版
@property (nonatomic ,strong) NSString * templateName;
@property (nonatomic ,strong) NSString * templateId;
@property (nonatomic ,strong) NSString * pondTissueId;
@property (nonatomic ,strong) NSString * pondId;
@property (nonatomic ,strong) NSString * taskId;


/// 告警内容
@property (nonatomic ,strong) NSString * alarmContent;

/// 告警程度 0.紧急、1.异常
@property (nonatomic ,assign) NSInteger alarmDegree;

///告警类型 1.池塘异常、2.任务异常、3.仓储异常、4.天气异常
@property (nonatomic ,assign) NSInteger alarmType;

///是否有关闭按钮 true:可以关闭
@property (nonatomic ,assign) BOOL canClose;

///1:打卡数值 2：任务数据 3：文字备注
@property (nonatomic ,assign) NSInteger alarmDataType;

///告警类型文字
@property (nonatomic ,strong) NSString * alarmType_dictText;

///池塘类型名称
@property (nonatomic ,strong) NSString * status_dictText;

///处理状态文字
@property (nonatomic ,strong) NSString *alarmDegree_dictText;

///池塘名称
@property (nonatomic ,strong) NSString * pondName;
///池塘编组名称
@property (nonatomic ,strong) NSString * pondTissueName;

//@property (nonatomic ,strong) NSString * pondStr;
//
//@property (nonatomic ,assign) CGFloat pondStrH ;
@property (nonatomic ,assign) CGFloat pondViewH ;

///处理状态 0.待处理 1.已处理
@property (nonatomic ,assign) NSInteger status ;


@property (nonatomic ,assign) CGFloat CellH ;
@property (nonatomic ,assign) CGFloat DetailsCellH ;

///告警处理记录
@property (nonatomic ,strong) NSArray<alarmProcessRecordModel *>* alarmProcessRecord;
///告警数据
@property (nonatomic ,strong) alarmDataModel * alarmData;
@property (nonatomic ,strong) NSArray<alarmDataModel *>* alarmDataList;

@property (nonatomic ,assign) CGFloat GJviewH ;
@property (nonatomic ,assign) CGFloat CLviewH ;

@property (nonatomic ,assign) CGFloat FooterviewH ;



///编组名称
@property (nonatomic ,strong) NSArray<CombinedPunchTissueListModel *> * pondTissues;
@property (nonatomic ,strong) NSString * tissueListStr;
@property (nonatomic ,assign) CGFloat tissueListStrH;


@end

///告警处理记录
@interface alarmProcessRecordModel:NSObject

///类型 1:新增任务 2:打卡记录 3:关闭 4:审批进程
@property (nonatomic ,assign) NSInteger type ;
///记录详情信息
@property (nonatomic ,strong) alarmProcessDetailModel * detail;
@property (nonatomic ,strong) NSArray< alarmProcessDetailModel *> * detailList;

///时间
@property (nonatomic ,strong) NSString * createTime;
@property (nonatomic ,assign) CGFloat createTimeW ;

///用户名
@property (nonatomic ,strong) NSString * user;
@property (nonatomic ,assign) CGFloat userH ;

@property (nonatomic ,assign) CGFloat backviewH ;

///审核任务的描述
@property (nonatomic ,strong) NSAttributedString * shrwStr;
@property (nonatomic ,assign) CGFloat shrwStrH;

///打卡任务的描述
@property (nonatomic ,strong) NSAttributedString * dkrwStr;
@property (nonatomic ,assign) CGFloat dkrwStrH;
@end

///记录详情信息
@interface alarmProcessDetailModel:NSObject
///executeTime
@property (nonatomic ,strong) NSString * executeTime;
///任务类型
@property (nonatomic ,strong) NSString * taskName;
///执行人
@property (nonatomic ,strong) NSString * executor;
@property (nonatomic ,assign) CGFloat executorStrH ;

///执行人Id
@property (nonatomic ,strong) NSString * executorId;
///2
///任务ID
@property (nonatomic ,strong) NSString * taskId;
///打卡信息
@property (nonatomic ,strong) NSArray<taskDetailModelListModel *> * taskDetailModelList;
@property (nonatomic ,strong) NSMutableArray<taskDetailModelListModel *> * CopytaskDetailModelList;

///3
///关闭原因
@property (nonatomic ,strong) NSString * closeReason;
///4
///交接人
@property (nonatomic ,strong) NSString * handover;
///操作时间
@property (nonatomic ,strong) NSString * processTime;
///操作标题
@property (nonatomic ,strong) NSString * processTitle;
/// 进程类型 1 取消 2 转交 3 同意 4 拒绝，其主要用于区分通用型字段
@property (nonatomic ,assign) NSInteger processType;
///是否允许批量打卡;1:允许 0:不允许
@property (nonatomic ,assign) NSInteger batchFlag;
///操作人
@property (nonatomic ,strong) NSString * processUserName;
///原因
@property (nonatomic ,strong) NSString * reason;
///除操作时间外的时间 如 取消时间
@property (nonatomic ,strong) NSString * time;
///标题-type = 4时使用
@property (nonatomic ,strong) NSString * title;
///内容type = 4时使用
@property (nonatomic ,strong) NSString * content;

///新增任务的描述
@property (nonatomic ,strong) NSAttributedString * xzrwStr;
@property (nonatomic ,assign) CGFloat xzrwStrH;

/// 语音备注，语音文件路径
@property (nonatomic ,strong) NSString * voiceUrl;

@property (nonatomic ,strong) NSString * voiceDuration;
@property (nonatomic ,strong) void(^openDurationBlock)(NSString *voiceDuration);
@property (nonatomic ,strong) NSString * cardImg;
@property (nonatomic ,strong) NSArray<NSString *> * cardImgArray;


@end

///告警内容
@interface alarmDataModel:NSObject
///主键id
@property (nonatomic ,strong) NSString * ID;

/// 告警id
@property (nonatomic ,strong) NSString * manageId;

///任务项名称
@property (nonatomic ,strong) NSString * name;

///正常值
@property (nonatomic ,strong) NSString * normalValue;

///基础数值
@property (nonatomic ,strong) NSString * number;
///单位
@property (nonatomic ,strong) NSString * unitName;

///父级id
@property (nonatomic ,strong) NSString * parentId;
///组合后的文本
@property (nonatomic ,strong) NSAttributedString * msStr;
@property (nonatomic ,assign) CGFloat msStrH;
@property (nonatomic ,assign) CGFloat msStrViewH;

@property (nonatomic ,strong) NSArray<alarmDataModel *> * children;

///
@property (nonatomic ,strong) NSString * data;
@property (nonatomic ,assign) CGFloat dataH ;

///remark
@property (nonatomic ,strong) NSString * remark;

@property (nonatomic ,strong) NSString * voiceDuration;
@property (nonatomic ,strong) void(^openDurationBlock)(NSString *voiceDuration);

///executeTime
@property (nonatomic ,strong) NSString * executeTime;
@property (nonatomic ,assign) CGFloat executeTimeStrH ;

///任务类型
@property (nonatomic ,strong) NSString * taskName;
@property (nonatomic ,assign) CGFloat taskNameStrH ;

///执行人
@property (nonatomic ,strong) NSString * executor;
@property (nonatomic ,assign) CGFloat executorStrH ;

///执行人Id
@property (nonatomic ,strong) NSString * executorId;



@end

///打卡信息
@interface taskDetailModelListModel:TemplateFoundDetailsTaskTypeModelListModel

@property (nonatomic ,strong) NSAttributedString * str;

@property (nonatomic ,assign) CGFloat strH ;
///子选项内容
@property (nonatomic ,strong) NSString * numberStr;

///日志的高度,宽度为252
@property (nonatomic ,assign) CGFloat RZstrH ;

@end


NS_ASSUME_NONNULL_END
